<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/26
 * Time: 21:27
 */
$user_id=$_POST['user_id'];
$content=$_POST['content'];

echo $user_id."<br>".$content."<br>"."插入成功";

$pdo=new PDO("mysql:dbname=test0925;host=127.0.0.1","root","");
$pdo->exec("SET NAMES 'utf8'");

$sql="INSERT INTO dc_comment (user_id,content) VALUES('$user_id','$content')";
$res=$pdo->query($sql);
